﻿<Window x:Class="TinyEngineEditor.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:vm="clr-namespace:TinyEngineEditor.ViewModels"
        xmlns:dock="clr-namespace:AvalonDock;assembly=AvalonDock"
        xmlns:scene="clr-namespace:TinyEngineEditor.SceneViewer"
        xmlns:controls="clr-namespace:TinyEngineEditor.Controls"
        Title="TinyEngine Editor" Height="800" Width="1024"
        WindowStartupLocation="CenterScreen"
        DataContext="{Binding Main, Source={StaticResource Locator}}">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Skins/MainSkin.xaml" />
                <!--<ResourceDictionary Source="/AvalonDock.Themes;component/themes/ExpressionDark.xaml"/>-->
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>

    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <StackPanel Orientation="Vertical" Grid.Row="0">
            <Menu HorizontalAlignment="Left" x:Name="menuMain" IsMainMenu="True">
                <MenuItem Header="File" x:Name="menuFile">
                    <MenuItem Header="New" Click="MenuNew_Click" />
                    <MenuItem Header="Open" Command="{Binding OpenCommand}" />
                    <MenuItem Header="Save" Command="{Binding SaveCommand}" />
                    <MenuItem Header="Close" Command="{Binding CloseCommand}" />
                </MenuItem>
                <MenuItem Header="Edit" x:Name="menuEdit" />
                <MenuItem Header="Project" x:Name="menuProject" >
                    <MenuItem IsEnabled="True" Header="Open Scene" Command="{Binding OpenSceneCommand}" />
                </MenuItem>
            </Menu>
            <ToolBarTray>
                <ToolBar Height="32" Name="toolbarStandard">
                    <Separator />
                </ToolBar>
            </ToolBarTray>
        </StackPanel>
        <dock:DockingManager x:Name="dockManager" Grid.Row="1">
            <dock:ResizingPanel Orientation="Vertical">
                <dock:ResizingPanel Orientation="Horizontal">
                    <dock:ResizingPanel Orientation="Vertical" dock:ResizingPanel.ResizeWidth="300">
                        <dock:DockablePane>
                            <dock:DockableContent x:Name="projectsContent" Title="Projects">
                                <TreeView>
                                    <TreeViewItem Header="Class1"/>
                                    <TreeViewItem Header="Class2"/>
                                </TreeView>
                            </dock:DockableContent>
                        </dock:DockablePane>
                        <dock:DockablePane>
                            <dock:DockableContent x:Name="sceneContent" Title="Scene">
                                <ListBox>
                                    <ListBoxItem Content="Scene Stuff"/>
                                    <ListBoxItem Content="Scene Stuff Again"/>
                                </ListBox>
                            </dock:DockableContent>
                        </dock:DockablePane>
                    </dock:ResizingPanel>
                    <dock:DocumentPane dock:ResizingPanel.ResizeWidth="*">
                        <dock:DocumentContent Title="Scene">
                            <scene:SceneViewer x:Name="sceneViewer1" FinishedLoading="sceneViewer1_FinishedLoading_1" />
                        </dock:DocumentContent>
                    </dock:DocumentPane>
                    <dock:DockablePane dock:ResizingPanel.ResizeWidth="150">
                        <dock:DockableContent x:Name="propertiesContent" Title="Properties">
                            
                        </dock:DockableContent>

                    </dock:DockablePane>
                </dock:ResizingPanel>
                <dock:DockablePane dock:ResizingPanel.ResizeHeight="140">
                    <dock:DockableContent Title="Errors" x:Name="errorsContent">
                        <ListView>
                            <ListView.View>
                                <GridView>
                                    <GridView.Columns>
                                        <GridViewColumn Header="Error"/>
                                        <GridViewColumn Header="Page"/>
                                        <GridViewColumn Header="File"/>
                                        <GridViewColumn Header="Row"/>
                                    </GridView.Columns>
                                </GridView>
                            </ListView.View>
                        </ListView>
                    </dock:DockableContent>
                    <dock:DockableContent Title="Output" x:Name="output">
                        <controls:LogOutput x:Name="logOutput1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
                    </dock:DockableContent>
                </dock:DockablePane>
                
            </dock:ResizingPanel>
        </dock:DockingManager>
        <StatusBar Grid.Row="2" Height="23" x:Name="statusBar" />
    </Grid>
</Window>
